/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.portalnahouby.api.serviceinterface;

import cz.muni.fi.pa165.portalnahouby.api.dto.Edibility;
import cz.muni.fi.pa165.portalnahouby.api.dto.MushroomDTO;
import java.util.List;

/**
 * Interface for mushroom service
 * 
 * @author Jakub Kutil
 */
public interface MushroomService {

    /**
     * Adds new mushroom
     *
     * @param mushroom new mushroom
     *
     * @throws NullPointerExcpetion thrown if mushroom is null
     * @throws IllegalArgumentException thrown if id of mushroom is not null
     */
    public void addMushroom(MushroomDTO mushroom);

    /**
     * Updates mushroom in database
     *
     * @param mushroom mushroom to be updated
     * @throws NullPointerException thrown if mushroom is null or its id is null
     *
     */
    public void editMushroom(MushroomDTO mushroom);

    /**
     * Deletes mushroom with specified id
     *
     * @param id id of mushroom to be deleted
     *
     * @throws NullPointerExcpetion thrown if id of mushroom is null
     */
    public void deleteMushroom(Long id);

    /**
     * Finds mushroom with specified id
     *
     * @param id id of mushroom to be found
     * @return Found mushroom
     *
     * @throws NullPointerExcpetion thrown if id of mushroom is null
     */
    public MushroomDTO findMushroom(Long id);

    /**
     * Gets all mushrooms ordered by name
     *
     * @return List of mushroom ordered by name
     */
    public List<MushroomDTO> getListSortByName();

    /**
     * Gets all mushrooms with selected edibility
     *
     * @param edibility selected edibility
     * @return List of mushroom with selected edibility
     */
    public List<MushroomDTO> getListByEdibility(Edibility edibility);
}
